﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;

namespace THO7AlgoritmTimerApplication {
    class Rotate90 : VisionAlgorithm {
        public int dir = 0;
        public Rotate90(String name): base(name) {}
        public override Bitmap DoAlgorithm(Bitmap sourceImage) {
            dir = getMarge();
            Bitmap dest = new Bitmap(sourceImage);
            if (dir == 1) {
                dest.RotateFlip(RotateFlipType.Rotate270FlipNone);
            } else if (dir == 2) {
                dest.RotateFlip(RotateFlipType.Rotate90FlipNone);
            }
            return dest;
        }
    }
}
